package com.laiyao.bean;

import com.spring.AOP.AopAnnotation.NeedLog;
import com.spring.springAnnotation.*;
import com.spring.springInterface.BeanNameAware;
import com.spring.springInterface.InitialnizeBean;

@Component
@Scope("singleton")
public class UserService implements BeanNameAware, InitialnizeBean{
    private String beanName;

    @Autowired
   private OrderService orderService;


    @NeedLog
    public void test() {
        System.out.println("原始方法");
    }


    @Override
    public void setBeanName(String BeanName) {
        this.beanName = BeanName;
    }
    @PostConstruct
    public  void test1(){

        System.out.println("初始化前方法");
    }

    @Override
    public void afterPropertiesSet() {
        System.out.println("初始化方法");
    }
}
